package com.zkjl.protect_business.service;

import com.zkjl.protect_business.dto.NoticeDTO;
import com.zkjl.protect_business.dto.PageBaseDTO;
import com.zkjl.protect_business.dto.PageDTO;
import com.zkjl.protect_business.dto.SortDTO;
import com.zkjl.protect_business.entity.Notice;
import com.zkjl.protect_business.vo.PageVO;
import org.springframework.data.domain.PageImpl;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface NoticeService {

    /**
     * 发起通知
     * @param noticeDTO
     * @return
     */
    Notice save(NoticeDTO noticeDTO);

    /**
     * 文件通知列表
     * @param pageBaseDTO
     * @param sortDTO
     * @param status
     * @return
     */
    PageImpl page(PageBaseDTO pageBaseDTO, SortDTO sortDTO, String status);


    /**
     * 删除通知
     * @param id
     * @return
     */
    Boolean del(String id);


    /**
     * 获取文件通知详情
     * @param id
     * @return
     */
    Notice get(String id);


    /**
     * 下载文件
     * @param response
     * @param noticeId
     * @param fileId
     */
    void download(HttpServletResponse response, String noticeId, String fileId) throws IOException;


}
